<%@ page language="java" import="java.util.*,com.shop.mall.entity.*,com.shop.mall.dao.impl.*" pageEncoding="utf-8" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
    <title>updateSubmit Page</title>
</head>
<% request.setCharacterEncoding("utf-8");
    String id = request.getParameter("id");
    String isbn = request.getParameter("isbn");
    String bookname = request.getParameter("bookname");
    String publisher = request.getParameter("publisher");
    String publisdate = request.getParameter("publisdate");
    String price = request.getParameter("price");
    BookDaoImpl bd = new BookDaoImpl();
    int r = bd.update(Integer.parseInt(id), bookname, isbn, publisher, Integer.parseInt(price), publisdate.replace(".0", ""));
    if (r == 1) { %>
<script type="text/javascript"> alert("修改成功！");
location.href = 'index.jsp';</script>
<%
    }
%>
<body>
</body>
</html>
